#pragma once
#include "..\dxstdafx.h"
#include <string>
#include <vector>
#include "..\nodes\Node.h"
#include "..\content\Material.h"
//--------------------------------------------------------------
//
//--------------------------------------------------------------
namespace ds {

class Sprite {

public:
	Vec2 position;
	RECT offset;
	Color color;
	float rotation;
	Vec2 scale;
	Vec2 center;

	Sprite() { 
		init(Vec2(0,0),Rect(0,0,0,0),Color(1.0f,1.0f,1.0f,1.0f),1.0f,1.0f,0.0f);		
	}
	Sprite(const Vec2& pos,const Rect& ofs) { 
		init(pos,ofs,Color(1.0f,1.0f,1.0f,1.0f),1.0f,1.0f,0.0f);		
	}
	Sprite(const Vec2& pos,const Rect& ofs,const Color& col) { 
		init(pos,ofs,col,1.0f,1.0f,0.0f);		
	}
	Sprite(const Vec2& pos,const Rect& ofs,const Color& col,float scaleX,float scaleY,float rot) {
		init(pos,ofs,col,scaleX,scaleY,rot);		
	}

private:
	void init(const Vec2& pos,const Rect& ofs,const Color& col,float scaleX,float scaleY,float rot) {
		position = pos;
		offset = ofs;
		color = col;
		scale = ds::Vec2(scaleX,scaleY);
		rotation = rot;
	}
};

}
